/*
 * @Description: 自定义点（特殊点）
 * @Date: 2022-02-28 12:23:15
 * @Author: yeming
 */

const CUSTOM_POINT = {
  ACCURATE_FIRE: 1, // 精确着火点
  ROUGH_FIRE: 2, // 粗略着火点
  POLICE: 3, // 警察位置
  FIREMAN: 4, // 消防员位置
  ROAMING_STATION: 5 // 漫游站位置
}

let customPoint = CUSTOM_POINT.ROUGH_FIRE

/**
 * @desc: 设置自定义点类型
 * @param {*} type
 * @return {*}
 * @use: 使用示例
 */
function setCustomPointType (type) {
  switch (type) {
    case 1:
      customPoint = CUSTOM_POINT.ACCURATE_FIRE
      console.log('精确着火点')
      break
    case 2:
      customPoint = CUSTOM_POINT.ROUGH_FIRE
      console.log('粗略着火点')
      break
    case 3:
      customPoint = CUSTOM_POINT.POLICE
      console.log('警察位置')
      break
    case 4:
      customPoint = CUSTOM_POINT.FIREMAN
      console.log('消防员位置')
      break
    case 5:
      customPoint = CUSTOM_POINT.ROAMING_STATION
      console.log('漫游站位置')
      break
    default:
      console.log('自定义点')
  }
}

/**
 * @desc: 获取自定义点类型
 */
function getCustomPointType () {
  return customPoint
}

export {
  CUSTOM_POINT,
  setCustomPointType,
  getCustomPointType
}
